package com.jm.product.entity;

import java.io.Serializable;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.google.common.collect.Lists;
/**
 * 商品管理Entity
 * @author sunshine
 * @version 2017-07-04
 */
@Entity
@Table(name = "es_goods")
@Cache(region = "com.jm.cache", usage = CacheConcurrencyStrategy.READ_WRITE)
public class Goods extends IdEntity<Integer> implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
    @Column(name="name")
	private String name;//商品名称
    @Column(name="sn")
	private String sn;//商品编号
    @Column(name="goods_type")
	private String goodType;//goods_type
    @Column(name="unit")
	private String unit;//unit
    @Column(name="weight")
	private Double weight;//weight
    @Column(name="market_enable")
	private String marketEnable;//上架
    @Column(name="brief")
	private String brief;//brief
    @Column(name="intro")
	private String intro;//intro
    @Column(name="price")
	private Double price;//销售价格
    @Column(name="cost")
	private Double cost;//成本价格
    @Column(name="mktprice")
	private Double mktprice;//市场价格
    @Column(name="props")
    private String props;//props
    @Column(name="params")
	private String params;//params
    @Column(name="specs")
	private String specs;//specs
    @Column(name="have_spec")
	private String haveSpec;//have_spec
    @Column(name="have_field")
	private String haveField;//have_field
    @Column(name="create_time", updatable=false)
	private java.util.Date createTime;//上架时间
    @Column(name="last_modify")
	private java.util.Date lastModify;//last_modify
    @Column(name="view_count")
	private Integer viewCount;//view_count
    @Column(name="buy_count")
	private Integer buyCount;//buy_count
    @Column(name="disabled")
	private String disabled;//disabled
    @Column(name="store")
	private Integer store;//store
    @Column(name="point")
	private Integer point;//point
    @Column(name="page_title")
	private String pageTitle;//page_title
    @Column(name="meta_keywords")
	private String metaKeywords;//meta_keywords
    @Column(name="meta_description")
	private String metaDescription;//meta_description
    @Column(name="p20")
	private String p20;//p20
    @Column(name="p19")
	private String p19;//p19
    @Column(name="p18")
	private String p18;//p18
    @Column(name="p17")
	private String p17;//p17
    @Column(name="p16")
	private String p16;//p16
    @Column(name="p15")
	private String p15;//p15
    @Column(name="p14")
	private String p14;//p14
    @Column(name="p13")
	private String p13;//p13
    @Column(name="p12")
	private String p12;//p12
    @Column(name="p11")
	private String p11;//p11
    @Column(name="p10")
	private String p10;//p10
    @Column(name="p9")
	private String p9;//p9
    @Column(name="p8")
	private String p8;//p8
    @Column(name="p7")
	private String p7;//p7
    @Column(name="p6")
	private String p6;//p6
    @Column(name="p5")
	private String p5;//p5
    @Column(name="p4")
	private String p4;//p4
    @Column(name="p3")
	private String p3;//p3
    @Column(name="p2")
	private String p2;//p2
    @Column(name="p1")
	private String p1;//p1
    @Column(name="sord")
	private Integer sord;//sord
    @Column(name="grade")
	private Integer grade;//grade
    @Column(name="goods_comment")
	private String goodsComment;//goods_comment
    @Column(name="is_pack")
	private String isPack;//is_pack
    @Column(name="thumbnail")
	private String thumbnail;//thumbnail
    @Column(name="big")
	private String big;//big
    @Column(name="small")
	private String small;//small
    @Column(name="original")
	private String original;//original
    
    @ManyToOne
    @JoinColumn(name="cat_id")
    private GoodsCat goodsCat;
    @ManyToOne
    @JoinColumn(name="brand_id")
    private Brand brand;
    @ManyToOne
    @JoinColumn(name="type_id")
    private GoodsType goodsType;
    
    @OneToMany(mappedBy="goods",orphanRemoval=true,
    		cascade={CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REMOVE})
    private List<Product> productList = Lists.newArrayList();
    @OneToMany(mappedBy = "goods",orphanRemoval=true,
    		cascade = {CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REMOVE})
    private List<GoodsSpec> goodsSpecMap = Lists.newArrayList() ;
    @OneToMany(mappedBy="goods",orphanRemoval=true,
    		cascade={CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REMOVE})
    private List<GoodsPhoto> goodsPhotoList = Lists.newArrayList();

	public Goods() {
		super();
	}
	
	/**
	*
	* get 商品名称
	*
	* return name
	*/
	public String getName() {
		return this.name;
	}
	
	/**
	 * 
	 * set 商品名称
	 * 
	 * @param name
	 */
	public void setName(String name) {
		this.name = name;
	}
	/**
	*
	* get 商品编号
	*
	* return sn
	*/
	public String getSn() {
		return this.sn;
	}
	
	/**
	 * 
	 * set 商品编号
	 * 
	 * @param sn
	 */
	public void setSn(String sn) {
		this.sn = sn;
	}
	
	public GoodsCat getGoodsCat() {
		return goodsCat;
	}

	public void setGoodsCat(GoodsCat goodsCat) {
		this.goodsCat = goodsCat;
	}

	public Brand getBrand() {
		return brand;
	}

	public void setBrand(Brand brand) {
		this.brand = brand;
	}

	public GoodsType getGoodsType() {
		return goodsType;
	}

	public void setGoodsType(GoodsType goodsType) {
		this.goodsType = goodsType;
	}

	/**
	*
	* get goods_type
	*
	* return goodsType
	*/
	public String getGoodType() {
		return this.goodType;
	}
	
	/**
	 * 
	 * set goods_type
	 * 
	 * @param goodsType
	 */
	public void setGoodType(String goodType) {
		this.goodType = goodType;
	}
	/**
	*
	* get unit
	*
	* return unit
	*/
	public String getUnit() {
		return this.unit;
	}
	
	/**
	 * 
	 * set unit
	 * 
	 * @param unit
	 */
	public void setUnit(String unit) {
		this.unit = unit;
	}
	/**
	*
	* get weight
	*
	* return weight
	*/
	public Double getWeight() {
		return this.weight;
	}
	
	/**
	 * 
	 * set weight
	 * 
	 * @param weight
	 */
	public void setWeight(Double weight) {
		this.weight = weight;
	}
	/**
	*
	* get 上架
	*
	* return marketEnable
	*/
	public String getMarketEnable() {
		return this.marketEnable;
	}
	
	/**
	 * 
	 * set 上架
	 * 
	 * @param marketEnable
	 */
	public void setMarketEnable(String marketEnable) {
		this.marketEnable = marketEnable;
	}
	/**
	*
	* get brief
	*
	* return brief
	*/
	public String getBrief() {
		return this.brief;
	}
	
	/**
	 * 
	 * set brief
	 * 
	 * @param brief
	 */
	public void setBrief(String brief) {
		this.brief = brief;
	}
	/**
	*
	* get intro
	*
	* return intro
	*/
	public String getIntro() {
		return this.intro;
	}
	
	/**
	 * 
	 * set intro
	 * 
	 * @param intro
	 */
	public void setIntro(String intro) {
		this.intro = intro;
	}
	/**
	*
	* get 销售价格
	*
	* return price
	*/
	public Double getPrice() {
		return this.price;
	}
	
	/**
	 * 
	 * set 销售价格
	 * 
	 * @param price
	 */
	public void setPrice(Double price) {
		this.price = price;
	}
	/**
	*
	* get 成本价格
	*
	* return cost
	*/
	public Double getCost() {
		return this.cost;
	}
	
	/**
	 * 
	 * set 成本价格
	 * 
	 * @param cost
	 */
	public void setCost(Double cost) {
		this.cost = cost;
	}
	/**
	*
	* get 市场价格
	*
	* return mktprice
	*/
	public Double getMktprice() {
		return this.mktprice;
	}
	
	/**
	 * 
	 * set 市场价格
	 * 
	 * @param mktprice
	 */
	public void setMktprice(Double mktprice) {
		this.mktprice = mktprice;
	}
	
	public String getProps() {
		return props;
	}

	public void setProps(String props) {
		this.props = props;
	}

	/**
	*
	* get params
	*
	* return params
	*/
	public String getParams() {
		return this.params;
	}
	
	/**
	 * 
	 * set params
	 * 
	 * @param params
	 */
	public void setParams(String params) {
		this.params = params;
	}
	/**
	*
	* get specs
	*
	* return specs
	*/
	public String getSpecs() {
		return this.specs;
	}
	
	/**
	 * 
	 * set specs
	 * 
	 * @param specs
	 */
	public void setSpecs(String specs) {
		this.specs = specs;
	}
	/**
	*
	* get have_spec
	*
	* return haveSpec
	*/
	public String getHaveSpec() {
		return this.haveSpec;
	}
	
	/**
	 * 
	 * set have_spec
	 * 
	 * @param haveSpec
	 */
	public void setHaveSpec(String haveSpec) {
		this.haveSpec = haveSpec;
	}
	/**
	*
	* get have_field
	*
	* return haveField
	*/
	public String getHaveField() {
		return this.haveField;
	}
	
	/**
	 * 
	 * set have_field
	 * 
	 * @param haveField
	 */
	public void setHaveField(String haveField) {
		this.haveField = haveField;
	}
	/**
	*
	* get 上架时间
	*
	* return createTime
	*/
	public java.util.Date getCreateTime() {
		return this.createTime;
	}
	
	/**
	 * 
	 * set 上架时间
	 * 
	 * @param createTime
	 */
	public void setCreateTime(java.util.Date createTime) {
		this.createTime = createTime;
	}
	/**
	*
	* get last_modify
	*
	* return lastModify
	*/
	public java.util.Date getLastModify() {
		return this.lastModify;
	}
	
	/**
	 * 
	 * set last_modify
	 * 
	 * @param lastModify
	 */
	public void setLastModify(java.util.Date lastModify) {
		this.lastModify = lastModify;
	}
	/**
	*
	* get view_count
	*
	* return viewCount
	*/
	public Integer getViewCount() {
		return this.viewCount;
	}
	
	/**
	 * 
	 * set view_count
	 * 
	 * @param viewCount
	 */
	public void setViewCount(Integer viewCount) {
		this.viewCount = viewCount;
	}
	/**
	*
	* get buy_count
	*
	* return buyCount
	*/
	public Integer getBuyCount() {
		return this.buyCount;
	}
	
	/**
	 * 
	 * set buy_count
	 * 
	 * @param buyCount
	 */
	public void setBuyCount(Integer buyCount) {
		this.buyCount = buyCount;
	}
	/**
	*
	* get disabled
	*
	* return disabled
	*/
	public String getDisabled() {
		return this.disabled;
	}
	
	/**
	 * 
	 * set disabled
	 * 
	 * @param disabled
	 */
	public void setDisabled(String disabled) {
		this.disabled = disabled;
	}
	/**
	*
	* get store
	*
	* return store
	*/
	public Integer getStore() {
		return this.store;
	}
	
	/**
	 * 
	 * set store
	 * 
	 * @param store
	 */
	public void setStore(Integer store) {
		this.store = store;
	}
	/**
	*
	* get point
	*
	* return point
	*/
	public Integer getPoint() {
		return this.point;
	}
	
	/**
	 * 
	 * set point
	 * 
	 * @param point
	 */
	public void setPoint(Integer point) {
		this.point = point;
	}
	/**
	*
	* get page_title
	*
	* return pageTitle
	*/
	public String getPageTitle() {
		return this.pageTitle;
	}
	
	/**
	 * 
	 * set page_title
	 * 
	 * @param pageTitle
	 */
	public void setPageTitle(String pageTitle) {
		this.pageTitle = pageTitle;
	}
	/**
	*
	* get meta_keywords
	*
	* return metaKeywords
	*/
	public String getMetaKeywords() {
		return this.metaKeywords;
	}
	
	/**
	 * 
	 * set meta_keywords
	 * 
	 * @param metaKeywords
	 */
	public void setMetaKeywords(String metaKeywords) {
		this.metaKeywords = metaKeywords;
	}
	/**
	*
	* get meta_description
	*
	* return metaDescription
	*/
	public String getMetaDescription() {
		return this.metaDescription;
	}
	
	/**
	 * 
	 * set meta_description
	 * 
	 * @param metaDescription
	 */
	public void setMetaDescription(String metaDescription) {
		this.metaDescription = metaDescription;
	}
	
	public String getP20() {
		return p20;
	}

	public void setP20(String p20) {
		this.p20 = p20;
	}

	public String getP19() {
		return p19;
	}

	public void setP19(String p19) {
		this.p19 = p19;
	}

	public String getP18() {
		return p18;
	}

	public void setP18(String p18) {
		this.p18 = p18;
	}

	public String getP17() {
		return p17;
	}

	public void setP17(String p17) {
		this.p17 = p17;
	}

	public String getP16() {
		return p16;
	}

	public void setP16(String p16) {
		this.p16 = p16;
	}

	public String getP15() {
		return p15;
	}

	public void setP15(String p15) {
		this.p15 = p15;
	}

	public String getP14() {
		return p14;
	}

	public void setP14(String p14) {
		this.p14 = p14;
	}

	public String getP13() {
		return p13;
	}

	public void setP13(String p13) {
		this.p13 = p13;
	}

	public String getP12() {
		return p12;
	}

	public void setP12(String p12) {
		this.p12 = p12;
	}

	public String getP11() {
		return p11;
	}

	public void setP11(String p11) {
		this.p11 = p11;
	}

	public String getP10() {
		return p10;
	}

	public void setP10(String p10) {
		this.p10 = p10;
	}

	/**
	*
	* get p9
	*
	* return p9
	*/
	public String getP9() {
		return this.p9;
	}
	
	/**
	 * 
	 * set p9
	 * 
	 * @param p9
	 */
	public void setP9(String p9) {
		this.p9 = p9;
	}
	/**
	*
	* get p8
	*
	* return p8
	*/
	public String getP8() {
		return this.p8;
	}
	
	/**
	 * 
	 * set p8
	 * 
	 * @param p8
	 */
	public void setP8(String p8) {
		this.p8 = p8;
	}
	/**
	*
	* get p7
	*
	* return p7
	*/
	public String getP7() {
		return this.p7;
	}
	
	/**
	 * 
	 * set p7
	 * 
	 * @param p7
	 */
	public void setP7(String p7) {
		this.p7 = p7;
	}
	/**
	*
	* get p6
	*
	* return p6
	*/
	public String getP6() {
		return this.p6;
	}
	
	/**
	 * 
	 * set p6
	 * 
	 * @param p6
	 */
	public void setP6(String p6) {
		this.p6 = p6;
	}
	/**
	*
	* get p5
	*
	* return p5
	*/
	public String getP5() {
		return this.p5;
	}
	
	/**
	 * 
	 * set p5
	 * 
	 * @param p5
	 */
	public void setP5(String p5) {
		this.p5 = p5;
	}
	/**
	*
	* get p4
	*
	* return p4
	*/
	public String getP4() {
		return this.p4;
	}
	
	/**
	 * 
	 * set p4
	 * 
	 * @param p4
	 */
	public void setP4(String p4) {
		this.p4 = p4;
	}
	/**
	*
	* get p3
	*
	* return p3
	*/
	public String getP3() {
		return this.p3;
	}
	
	/**
	 * 
	 * set p3
	 * 
	 * @param p3
	 */
	public void setP3(String p3) {
		this.p3 = p3;
	}
	/**
	*
	* get p2
	*
	* return p2
	*/
	public String getP2() {
		return this.p2;
	}
	
	/**
	 * 
	 * set p2
	 * 
	 * @param p2
	 */
	public void setP2(String p2) {
		this.p2 = p2;
	}
	/**
	*
	* get p1
	*
	* return p1
	*/
	public String getP1() {
		return this.p1;
	}
	
	/**
	 * 
	 * set p1
	 * 
	 * @param p1
	 */
	public void setP1(String p1) {
		this.p1 = p1;
	}
	
	/**
	*
	* get sord
	*
	* return sord
	*/
	public Integer getSord() {
		return this.sord;
	}
	
	/**
	 * 
	 * set sord
	 * 
	 * @param sord
	 */
	public void setSord(Integer sord) {
		this.sord = sord;
	}
	/**
	*
	* get grade
	*
	* return grade
	*/
	public Integer getGrade() {
		return this.grade;
	}
	
	/**
	 * 
	 * set grade
	 * 
	 * @param grade
	 */
	public void setGrade(Integer grade) {
		this.grade = grade;
	}
	/**
	*
	* get goods_comment
	*
	* return goodsComment
	*/
	public String getGoodsComment() {
		return this.goodsComment;
	}
	
	/**
	 * 
	 * set goods_comment
	 * 
	 * @param goodsComment
	 */
	public void setGoodsComment(String goodsComment) {
		this.goodsComment = goodsComment;
	}
	/**
	*
	* get is_pack
	*
	* return isPack
	*/
	public String getIsPack() {
		return this.isPack;
	}
	
	/**
	 * 
	 * set is_pack
	 * 
	 * @param isPack
	 */
	public void setIsPack(String isPack) {
		this.isPack = isPack;
	}
	/**
	*
	* get thumbnail
	*
	* return thumbnail
	*/
	public String getThumbnail() {
		return this.thumbnail;
	}
	
	/**
	 * 
	 * set thumbnail
	 * 
	 * @param thumbnail
	 */
	public void setThumbnail(String thumbnail) {
		this.thumbnail = thumbnail;
	}
	/**
	*
	* get big
	*
	* return big
	*/
	public String getBig() {
		return this.big;
	}
	
	/**
	 * 
	 * set big
	 * 
	 * @param big
	 */
	public void setBig(String big) {
		this.big = big;
	}
	/**
	*
	* get small
	*
	* return small
	*/
	public String getSmall() {
		return this.small;
	}
	
	/**
	 * 
	 * set small
	 * 
	 * @param small
	 */
	public void setSmall(String small) {
		this.small = small;
	}
	/**
	*
	* get original
	*
	* return original
	*/
	public String getOriginal() {
		return this.original;
	}
	
	/**
	 * 
	 * set original
	 * 
	 * @param original
	 */
	public void setOriginal(String original) {
		this.original = original;
	}

	public List<Product> getProductList() {
		return productList;
	}

	public void setProductList(List<Product> productList) {
		this.productList = productList;
	}

	public List<GoodsSpec> getGoodsSpecMap() {
		return goodsSpecMap;
	}

	public void setGoodsSpecMap(List<GoodsSpec> goodsSpecMap) {
		this.goodsSpecMap = goodsSpecMap;
	}

	public List<GoodsPhoto> getGoodsPhotoList() {
		return goodsPhotoList;
	}

	public void setGoodsPhotoList(List<GoodsPhoto> goodsPhotoList) {
		this.goodsPhotoList = goodsPhotoList;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((big == null) ? 0 : big.hashCode());
		result = prime * result + ((brief == null) ? 0 : brief.hashCode());
		result = prime * result + ((buyCount == null) ? 0 : buyCount.hashCode());
		result = prime * result + ((cost == null) ? 0 : cost.hashCode());
		result = prime * result + ((createTime == null) ? 0 : createTime.hashCode());
		result = prime * result + ((disabled == null) ? 0 : disabled.hashCode());
		result = prime * result + ((goodsComment == null) ? 0 : goodsComment.hashCode());
		result = prime * result + ((goodsType == null) ? 0 : goodsType.hashCode());
		result = prime * result + ((grade == null) ? 0 : grade.hashCode());
		result = prime * result + ((haveField == null) ? 0 : haveField.hashCode());
		result = prime * result + ((haveSpec == null) ? 0 : haveSpec.hashCode());
		result = prime * result + ((intro == null) ? 0 : intro.hashCode());
		result = prime * result + ((isPack == null) ? 0 : isPack.hashCode());
		result = prime * result + ((lastModify == null) ? 0 : lastModify.hashCode());
		result = prime * result + ((marketEnable == null) ? 0 : marketEnable.hashCode());
		result = prime * result + ((metaDescription == null) ? 0 : metaDescription.hashCode());
		result = prime * result + ((metaKeywords == null) ? 0 : metaKeywords.hashCode());
		result = prime * result + ((mktprice == null) ? 0 : mktprice.hashCode());
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		result = prime * result + ((original == null) ? 0 : original.hashCode());
		result = prime * result + ((p1 == null) ? 0 : p1.hashCode());
		result = prime * result + ((p10 == null) ? 0 : p10.hashCode());
		result = prime * result + ((p11 == null) ? 0 : p11.hashCode());
		result = prime * result + ((p12 == null) ? 0 : p12.hashCode());
		result = prime * result + ((p13 == null) ? 0 : p13.hashCode());
		result = prime * result + ((p14 == null) ? 0 : p14.hashCode());
		result = prime * result + ((p15 == null) ? 0 : p15.hashCode());
		result = prime * result + ((p16 == null) ? 0 : p16.hashCode());
		result = prime * result + ((p17 == null) ? 0 : p17.hashCode());
		result = prime * result + ((p18 == null) ? 0 : p18.hashCode());
		result = prime * result + ((p19 == null) ? 0 : p19.hashCode());
		result = prime * result + ((p2 == null) ? 0 : p2.hashCode());
		result = prime * result + ((p20 == null) ? 0 : p20.hashCode());
		result = prime * result + ((p3 == null) ? 0 : p3.hashCode());
		result = prime * result + ((p4 == null) ? 0 : p4.hashCode());
		result = prime * result + ((p5 == null) ? 0 : p5.hashCode());
		result = prime * result + ((p6 == null) ? 0 : p6.hashCode());
		result = prime * result + ((p7 == null) ? 0 : p7.hashCode());
		result = prime * result + ((p8 == null) ? 0 : p8.hashCode());
		result = prime * result + ((p9 == null) ? 0 : p9.hashCode());
		result = prime * result + ((pageTitle == null) ? 0 : pageTitle.hashCode());
		result = prime * result + ((params == null) ? 0 : params.hashCode());
		result = prime * result + ((point == null) ? 0 : point.hashCode());
		result = prime * result + ((price == null) ? 0 : price.hashCode());
		result = prime * result + ((productList == null) ? 0 : productList.hashCode());
		result = prime * result + ((props == null) ? 0 : props.hashCode());
		result = prime * result + ((small == null) ? 0 : small.hashCode());
		result = prime * result + ((sn == null) ? 0 : sn.hashCode());
		result = prime * result + ((sord == null) ? 0 : sord.hashCode());
		result = prime * result + ((specs == null) ? 0 : specs.hashCode());
		result = prime * result + ((store == null) ? 0 : store.hashCode());
		result = prime * result + ((thumbnail == null) ? 0 : thumbnail.hashCode());
		result = prime * result + ((unit == null) ? 0 : unit.hashCode());
		result = prime * result + ((viewCount == null) ? 0 : viewCount.hashCode());
		result = prime * result + ((weight == null) ? 0 : weight.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Goods other = (Goods) obj;
		if (big == null) {
			if (other.big != null)
				return false;
		} else if (!big.equals(other.big))
			return false;
		if (brief == null) {
			if (other.brief != null)
				return false;
		} else if (!brief.equals(other.brief))
			return false;
		if (buyCount == null) {
			if (other.buyCount != null)
				return false;
		} else if (!buyCount.equals(other.buyCount))
			return false;
		if (cost == null) {
			if (other.cost != null)
				return false;
		} else if (!cost.equals(other.cost))
			return false;
		if (createTime == null) {
			if (other.createTime != null)
				return false;
		} else if (!createTime.equals(other.createTime))
			return false;
		if (disabled == null) {
			if (other.disabled != null)
				return false;
		} else if (!disabled.equals(other.disabled))
			return false;
		if (goodsComment == null) {
			if (other.goodsComment != null)
				return false;
		} else if (!goodsComment.equals(other.goodsComment))
			return false;
		if (goodsType == null) {
			if (other.goodsType != null)
				return false;
		} else if (!goodsType.equals(other.goodsType))
			return false;
		if (grade == null) {
			if (other.grade != null)
				return false;
		} else if (!grade.equals(other.grade))
			return false;
		if (haveField == null) {
			if (other.haveField != null)
				return false;
		} else if (!haveField.equals(other.haveField))
			return false;
		if (haveSpec == null) {
			if (other.haveSpec != null)
				return false;
		} else if (!haveSpec.equals(other.haveSpec))
			return false;
		if (intro == null) {
			if (other.intro != null)
				return false;
		} else if (!intro.equals(other.intro))
			return false;
		if (isPack == null) {
			if (other.isPack != null)
				return false;
		} else if (!isPack.equals(other.isPack))
			return false;
		if (lastModify == null) {
			if (other.lastModify != null)
				return false;
		} else if (!lastModify.equals(other.lastModify))
			return false;
		if (marketEnable == null) {
			if (other.marketEnable != null)
				return false;
		} else if (!marketEnable.equals(other.marketEnable))
			return false;
		if (metaDescription == null) {
			if (other.metaDescription != null)
				return false;
		} else if (!metaDescription.equals(other.metaDescription))
			return false;
		if (metaKeywords == null) {
			if (other.metaKeywords != null)
				return false;
		} else if (!metaKeywords.equals(other.metaKeywords))
			return false;
		if (mktprice == null) {
			if (other.mktprice != null)
				return false;
		} else if (!mktprice.equals(other.mktprice))
			return false;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		if (original == null) {
			if (other.original != null)
				return false;
		} else if (!original.equals(other.original))
			return false;
		if (p1 == null) {
			if (other.p1 != null)
				return false;
		} else if (!p1.equals(other.p1))
			return false;
		if (p10 == null) {
			if (other.p10 != null)
				return false;
		} else if (!p10.equals(other.p10))
			return false;
		if (p11 == null) {
			if (other.p11 != null)
				return false;
		} else if (!p11.equals(other.p11))
			return false;
		if (p12 == null) {
			if (other.p12 != null)
				return false;
		} else if (!p12.equals(other.p12))
			return false;
		if (p13 == null) {
			if (other.p13 != null)
				return false;
		} else if (!p13.equals(other.p13))
			return false;
		if (p14 == null) {
			if (other.p14 != null)
				return false;
		} else if (!p14.equals(other.p14))
			return false;
		if (p15 == null) {
			if (other.p15 != null)
				return false;
		} else if (!p15.equals(other.p15))
			return false;
		if (p16 == null) {
			if (other.p16 != null)
				return false;
		} else if (!p16.equals(other.p16))
			return false;
		if (p17 == null) {
			if (other.p17 != null)
				return false;
		} else if (!p17.equals(other.p17))
			return false;
		if (p18 == null) {
			if (other.p18 != null)
				return false;
		} else if (!p18.equals(other.p18))
			return false;
		if (p19 == null) {
			if (other.p19 != null)
				return false;
		} else if (!p19.equals(other.p19))
			return false;
		if (p2 == null) {
			if (other.p2 != null)
				return false;
		} else if (!p2.equals(other.p2))
			return false;
		if (p20 == null) {
			if (other.p20 != null)
				return false;
		} else if (!p20.equals(other.p20))
			return false;
		if (p3 == null) {
			if (other.p3 != null)
				return false;
		} else if (!p3.equals(other.p3))
			return false;
		if (p4 == null) {
			if (other.p4 != null)
				return false;
		} else if (!p4.equals(other.p4))
			return false;
		if (p5 == null) {
			if (other.p5 != null)
				return false;
		} else if (!p5.equals(other.p5))
			return false;
		if (p6 == null) {
			if (other.p6 != null)
				return false;
		} else if (!p6.equals(other.p6))
			return false;
		if (p7 == null) {
			if (other.p7 != null)
				return false;
		} else if (!p7.equals(other.p7))
			return false;
		if (p8 == null) {
			if (other.p8 != null)
				return false;
		} else if (!p8.equals(other.p8))
			return false;
		if (p9 == null) {
			if (other.p9 != null)
				return false;
		} else if (!p9.equals(other.p9))
			return false;
		if (pageTitle == null) {
			if (other.pageTitle != null)
				return false;
		} else if (!pageTitle.equals(other.pageTitle))
			return false;
		if (params == null) {
			if (other.params != null)
				return false;
		} else if (!params.equals(other.params))
			return false;
		if (point == null) {
			if (other.point != null)
				return false;
		} else if (!point.equals(other.point))
			return false;
		if (price == null) {
			if (other.price != null)
				return false;
		} else if (!price.equals(other.price))
			return false;
		if (productList == null) {
			if (other.productList != null)
				return false;
		} else if (!productList.equals(other.productList))
			return false;
		if (props == null) {
			if (other.props != null)
				return false;
		} else if (!props.equals(other.props))
			return false;
		if (small == null) {
			if (other.small != null)
				return false;
		} else if (!small.equals(other.small))
			return false;
		if (sn == null) {
			if (other.sn != null)
				return false;
		} else if (!sn.equals(other.sn))
			return false;
		if (sord == null) {
			if (other.sord != null)
				return false;
		} else if (!sord.equals(other.sord))
			return false;
		if (specs == null) {
			if (other.specs != null)
				return false;
		} else if (!specs.equals(other.specs))
			return false;
		if (store == null) {
			if (other.store != null)
				return false;
		} else if (!store.equals(other.store))
			return false;
		if (thumbnail == null) {
			if (other.thumbnail != null)
				return false;
		} else if (!thumbnail.equals(other.thumbnail))
			return false;
		if (unit == null) {
			if (other.unit != null)
				return false;
		} else if (!unit.equals(other.unit))
			return false;
		if (viewCount == null) {
			if (other.viewCount != null)
				return false;
		} else if (!viewCount.equals(other.viewCount))
			return false;
		if (weight == null) {
			if (other.weight != null)
				return false;
		} else if (!weight.equals(other.weight))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "Goods [name=" + name + ", sn=" + sn + ", goodType=" + goodType + ", unit=" + unit + ", weight="
				+ weight + ", marketEnable=" + marketEnable + ", brief=" + brief + ", intro=" + intro + ", price="
				+ price + ", cost=" + cost + ", mktprice=" + mktprice + ", props=" + props + ", params=" + params
				+ ", specs=" + specs + ", haveSpec=" + haveSpec + ", haveField=" + haveField + ", createTime="
				+ createTime + ", lastModify=" + lastModify + ", viewCount=" + viewCount + ", buyCount=" + buyCount
				+ ", disabled=" + disabled + ", store=" + store + ", point=" + point + ", pageTitle=" + pageTitle
				+ ", metaKeywords=" + metaKeywords + ", metaDescription=" + metaDescription + ", p20=" + p20 + ", p19="
				+ p19 + ", p18=" + p18 + ", p17=" + p17 + ", p16=" + p16 + ", p15=" + p15 + ", p14=" + p14 + ", p13="
				+ p13 + ", p12=" + p12 + ", p11=" + p11 + ", p10=" + p10 + ", p9=" + p9 + ", p8=" + p8 + ", p7=" + p7
				+ ", p6=" + p6 + ", p5=" + p5 + ", p4=" + p4 + ", p3=" + p3 + ", p2=" + p2 + ", p1=" + p1 + ", sord="
				+ sord + ", grade=" + grade + ", goodsComment=" + goodsComment + ", isPack=" + isPack + ", thumbnail="
				+ thumbnail + ", big=" + big + ", small=" + small + ", original=" + original + ", goodsCat=" + goodsCat
				+ ", brand=" + brand + ", goodsType=" + goodsType + ", productList=" + productList + "]";
	}

}
